<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>2d-缩放</title>
  <style>
    div {
      width: 300px;
      /* height: 300px; */
      border: 5px solid red;
      margin: 100px auto;
      /* overflow: hidden; */
    }

    img {
      width: 100%;
      transition: all 2s;

      transform-origin: left top;
      /* 改变中心点的位置 
            center默认
            left top
            left bottom

            left center

            right top
            right bottom

            right center
            */
    }

    div:hover img {
      /* width: 150%; */
      transform: scale(1.5);
      /* 负值会以倒像放大为结果 
              支持x轴 y轴单独放大
              scaleX
              scaleY
            */
      /* transform: scaleX(1.5); */
      /* transform: scaleY(1.5); */

    }
  </style>
</head>

<body>
  <div>
    <img src="./img1/2.png" alt="">
  </div>
</body>

</html>